// Must use eps for comparison with 0
#include <iostream>
#include <iomanip>
#include <sstream>
#include <cmath>

using namespace std;

#define eps 1E-9

struct point {
	double x, y;
};

point A, B, C;

double CCW(point p0, point p1, point p2)
{
	double dx1 = p1.x - p0.x;
	double dy1 = p1.y - p0.y;
	double dx2 = p2.x - p0.x;
	double dy2 = p2.y - p0.y;

	return dx1*dy2 - dx2*dy1;
}

bool same(point p0, point p1)
{
	return (abs(p0.x-p1.x) < eps && abs(p0.y-p1.y) < eps);
}

double min3(double x, double y, double z)
{
	double t = x;
	if (t > y) t = y;
	if (t > z) t = z;
	return t;
}

double max3(double x, double y, double z)
{
	double t = x;
	if (t < y) t = y;
	if (t < z) t = z;
	return t;
}

int main()
{
	while (true)
	{
		cin >> A.x >> A.y >> B.x >> B.y >> C.x >> C.y;		
		if (A.x == 0 && A.y == 0 && B.x == 0 && B.y == 0  && C.x == 0 && C.y == 0) break;

		double minX = min3(A.x, B.x, C.x), maxX = max3(A.x, B.x, C.x);
		double minY = min3(A.y, B.y, C.y), maxY = max3(A.y, B.y, C.y); 

		int count = 0;
		for (int xx = 1; xx <= 99; xx++)
		for (int yy = 1; yy <= 99; yy++)
			if (minX <= xx && xx <= maxX && minY <= yy && yy <= maxY)
			{
				point P;
				P.x = xx;
				P.y = yy;

				double ca = CCW(A, B, P);
				double cb = CCW(B, C, P);
				double cc = CCW(C, A, P);

				// three different points
				if (!same(A, B) && !same(B, C) && !same(C, A))	
				{			

					if ((ca < eps && cb < eps && cc < eps) || (ca > -eps && cb > -eps && cc > -eps)) count++;
				}
				else
					// reduced to one point only
					if (same(A, B) && same(B, C) && same(C, A)) 
					{
						if (same(A, P)) count++;
					}
					else
						// deduced to two points
						if (abs(ca) < eps && abs(cb) < eps && abs(cc) < eps) 
						{
							count++;
						}
			}

		cout << setw(4) << count << endl;
	}
	return 0;
}
